<?php keke_tpl_class::checkrefresh('tpl/default/ajax/report', '1460013857' );?>
<div class="modal-body">
  <form role="form" action="<?php echo $strUrl;?>" method="post" class="form-horizontal" name="editReportForm" id="editReportForm">
          	 <input type="hidden" name="formhash" id="formhash" value="<?php echo FORMHASH;?>">
 <input type="hidden" name="objType" value="<?php echo $objType;?>">
     <input type="hidden" name="objId" value="<?php echo $objId;?>">
     <input type="hidden" name="type" value="<?php echo $type;?>">
     <input type="hidden" name="toUid" value="<?php echo $toUid;?>">
 <input type="hidden" name="agreeId" value="<?php echo $agreeId;?>" id="agreeId">
 <input type="hidden" name="taskId" value="<?php echo $taskId;?>" id="taskId">
     <input type="hidden" name="toUsername" value="<?php echo $toUsername;?>">
 <input type="hidden" name="serviceId"  value="<?php echo $serviceId;?>">

           <div class="form-group">
              <label class="col-sm-2 control-label"><?php echo $transname;?>类型：</label>
                   <div class="col-sm-4">
                   <select class="form-control" name="sltReason" id="sltReason" >
 	<?php if(is_array($report_reason)) { foreach($report_reason as $k => $v) { ?>
 		<option value="<?php echo $v;?>"><?php echo $v;?></option>
<?php } } ?>
                   </select>
                 </div>
           </div>
           <div class="form-group">
              <label class="col-sm-2 control-label" for="tarContent"><?php echo $transname;?>说明：</label>
              <div class="col-sm-8">
                 <textarea id="tarContent" name="tarContent" rows="5" class="form-control"></textarea>
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-2 control-label" for="upload">图片上传：</label>
                <div class="col-sm-8">
                	  <!--<input type="file" name="upload" id="upload" class="file">-->
  <div id="picker">上传附件</div>
                  	  <input type="hidden"  name="filepath" id="filepath"  class="form-control" >
                  	  <ul class="affix-list upload-file-list-info" id="fileList"></ul>
                  	  <p class="ws_break text-muted">
              	<small>一次最多传1个，每个文件大小上限2M，格式:*.jpg;*.jpeg;*.gif;*.bmp;*.png;</small>
            </p>

                </div>

            </div>


            <div class="form-group">
              <div class="col-sm-offset-2 col-sm-10">
                <button class="btn btn-default" type="submit" value="1" >确定</button>
                <span class="text-success" id="tipsUser"></span>
              </div>
            </div>
          </form>
</div>
<script type="text/javascript">
$(function(){
$('#editReportForm').scojs_valid({
    rules:{
    	tarContent: ['not_empty',{'max_length': 140}]

    },
    messages: {
    	tarContent: {
not_empty: "请输入举报说明",
max_length:'输入最大长度不得超过140个字符'
}

    },
    wrapper:'.form-group'
    ,onSuccess: function(response, validator) {
    	//关闭举报弹窗，延迟提示
    	$('.modal-header>.close').trigger('click');
    	var stt = setTimeout(function(){
    		tipsOp(response.data,response.status);
    		clearTimeout(stt);
    		if(response.url){
    			setTimeout(function(){window.location.href=response.url;},2000);
      	  	}
    	},1000);
    }
});
});

</script>


<link rel="stylesheet" type="text/css" href="<?php echo $_K['siteurl'];?>/static/js/webuploader/webuploader.css">
<script type="text/javascript" src="<?php echo $_K['siteurl'];?>/static/js/webuploader/webuploader.js?r=<?php echo RANDOM_PARA;?>"></script>
<script type="text/javascript" src="<?php echo $_K['siteurl'];?>/static/js/webuploader/kppw.webuploader.js"></script>
<script>
var uploadsize = parseInt("<?php echo $basic_config['max_size'];?>");
uploadsize =  isNaN(uploadsize)? 1 : uploadsize;
$(function(){
$("#picker").KKUploader({
accept: {
extensions : 'jpg,jpeg,gif,bmp,png'  //可上传文件格式
},
fileNumLimit:1,			//上传数量限制
hiddenName:'filepath',	//表单隐藏域id
hiddenValType:'2',		//指定隐藏域保存值的类型   1=是保存file_id ，2=保存save_name
listName:'fileList',	//指定上传文件列表ID，如果不指定，则默认为fileList
fileSingleSizeLimit:uploadsize*1024*1024			//上传大小限制
},
{
taskId:'<?php echo $taskId;?>',
objType:'work',
filename : 'file'//传递给服务端的参数指定上传文本域的name，如果未指定，上传不成功
});
});
</script><?php keke_tpl_class::ob_out();?>